package com.cinc.ebc.sd.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.sd.entity.SdSalesOrderDetail;
import com.cinc.ebc.sd.entity.SdSalesOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cinc.ebc.sd.model.*;
import com.cinc.ebc.sd.vo.SdRptSalesOrderStatPage;
import com.cinc.ebc.sd.vo.SdSalesOrderDetailPage;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 销售订单
 * @Author: jeecg-boot
 * @Date:   2022-09-25
 * @Version: V1.0
 */
public interface ISdSalesOrderService extends IService<SdSalesOrder> {

	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(SdSalesOrder sdSalesOrder,List<SdSalesOrderDetail> sdSalesOrderDetailList) ;

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(SdSalesOrder sdSalesOrder,List<SdSalesOrderDetail> sdSalesOrderDetailList);

	/**
	 * 删除一对多
	 */
	public void delMain (String id);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	void autoUpdateSalesOrder(String id);

    IPage<SdRptSalesOrderMaterialStatModel> queryRptMaterialStatList(Page<SdRptSalesOrderMaterialStatModel> page, SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

	SdRptSalesOrderMaterialStatTotalModel queryRptMaterialStatTotal(SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

	IPage<SdRptSalesOrderCustomerStatModel> queryRptCustomerStatList(Page<SdRptSalesOrderCustomerStatModel> page, SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

	SdRptSalesOrderCustomerStatTotalModel queryRptCustomerStatTotal(SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

    void queryCustomerMaterialStatPageList(Page<SdSalesOrderCustomerMaterialModel> page, SdSalesOrderDetailPage detailPage);
}
